package components;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

import componentsAbstract.CompAbstract;

public class LinkText extends CompAbstract{

	public LinkText(WebDriver driver, By fieldName) {
		this.driver = driver;
		this.fieldName = fieldName;
		this.classInfo = this.getClass().getCanonicalName();
	}
	
	
	public boolean click() throws Exception
	{
		/*try{
			classInfo += " public boolean click()";
			sprawdzFieldObject(classInfo);
			fieldObject.click();
		}
		catch (StaleElementReferenceException s) {
			int licz=0;
			while(licz<10 && !Utils.safeClickLinkText(driver, fieldName))
			{
				Thread.sleep(1000);
				licz++;
				
			}
		}		*/
		classInfo += " public boolean click()";
		sprawdzFieldObject(classInfo);
		safeClick();
		return true;
	}
	
	
	
}
